#pragma once

#include <windows.h>

class CInstDrv
{
public:
    CInstDrv(void);
    ~CInstDrv(void);
public:
    static BOOL LoadDeviceDriver(const TCHAR* Name, const TCHAR* Path, 
                                 HANDLE * lphDevice, PDWORD Error);
    static BOOL UnloadDeviceDriver( const TCHAR * Name );
    static BOOL GetDriverPath( IN LPTSTR lpDrvName, OUT LPTSTR lpFileName, IN DWORD dwSize );
private:
    static BOOL RemoveDriver( IN SC_HANDLE SchSCManager, IN LPCTSTR DriverName );
    static BOOL StopDriver( IN SC_HANDLE SchSCManager, IN LPCTSTR DriverName );
    static BOOL OpenDevice( IN LPCTSTR DriverName, HANDLE * lphDevice );
    static BOOL StartDriver( IN SC_HANDLE SchSCManager, IN LPCTSTR DriverName );
    static BOOL InstallDriver( IN SC_HANDLE SchSCManager, IN LPCTSTR DriverName, IN LPCTSTR ServiceExe );
private:
};
